<span>
	<#if artSize==0>
	<div class="page" > 
		<h2>No posts found. Try a different search?</h2> 
	</div>
	</span>
	<#elseif page==1 >
		<div class="wp-pagenavi">
			<#if artSize<2>
				<span></span>
			<#else>
			<span class="pages">Page ${page} of ${(artSize/2)?ceiling}</span>
			<#list page..(artSize/2)?ceiling as i>
			<span>
				<#if i==page>
					<span class="current">${page}</span>
				<#else>
					<a href="/${type}/${key}/${i}/" class="page" >${i}</a>
				</#if>
			</span>	
			</#list>
			
			<a href="/${type}/${key}/${page+1}/" class="nextpostslink">&raquo;</a>
			<span class="extend">...</span>
			<a href="/${type}/${key}/${(artSize/2)?ceiling}" class="last" title="Last &raquo;">Last &raquo;</a>
			</#if>
		</div>
	<#elseif (artSize/2)?ceiling<=10>
		<div class="wp-pagenavi">
			<span class="pages">Page ${page} of ${(artSize/2)?ceiling}</span>
			<#list 1..(artSize/2)?ceiling as i>
			<span>
				<#if i==page>
					<span class="current">${page}</span>
				<#else>
					<a href="/${type}/${key}/${i}/" class="page" >${i}</a>
				</#if>
			</span>	
			</#list>
		</div>
	<#elseif page==(artSize/2)?ceiling>
		<div class="wp-pagenavi">
			<span class="pages">Page ${page} of ${(artSize/2)?ceiling}</span>
			<a href="/${type}/${key}/1/" class="first" title="&laquo; First">&laquo; First</a>
			<span class="extend">...</span>
			<a href="/${type}/${key}/${page-1}/" class="previouspostslink">&laquo;</a>
			
			<#list page..(artSize/2)?ceiling as i>
			<span>
				<#if i==page>
					<span class="current">${page}</span>
				<#else>
					<a href="/${type}/${key}/${i}/" class="page" >${i}</a>
				</#if>
			</span>	
			</#list>
		</div>
	<#else>
		<div class="wp-pagenavi">
			<span class="pages">Page ${page} of ${(artSize/2)?ceiling}</span>
			<a href="/${type}/${key}/1/" class="first" title="&laquo; First">&laquo; First</a>
			<span class="extend">...</span>
			<a href="/${type}/${key}/${page-1}/" class="previouspostslink">&laquo;</a>
			
			<#list page..(artSize/2)?ceiling as i>
			<span>
				<#if i==page>
					<span class="current">${page}</span>
				<#else>
					<a href="/${type}/${key}/${i}/" class="page" >${i}</a>
				</#if>
			</span>	
			</#list>
			<a href="/${type}/${key}/${page+1}/" class="nextpostslink">&raquo;</a>
			<span class="extend">...</span>
			<a href="/${type}/${key}/${(artSize/2)?ceiling}" class="last" title="Last &raquo;">Last &raquo;</a>
		</div>
	</#if>